Customize Form - Fields Table

The fields table in the Customize Form Doctype allows users to manage individual fields of the selected Doctype. Each row in this table represents a single field of the Doctype and includes various properties that determine its behavior and appearance. Here is a breakdown of the individual fields in the fields table and their usage:


1. label

  • Description: The display name of the field in the form or list view.
  • Use: Modify the label to make it more descriptive or localized for user understanding.

2. fieldname

  • Description: The unique identifier for the field in the database.
  • Use: Used in backend logic, scripts, and custom queries. Should remain unique within the Doctype.

3. fieldtype

  • Description: Specifies the type of field (e.g., Data, Select, Table, Link).
  • Use: Determines how the field behaves and what kind of data it can store. For example:
    • Data for free-text input.
    • Link to link another Doctype.
    • Table to include child tables.


4. options

  • Description: Additional configuration for the field, depending on its type.
  • Use:
    • For Link fields, specify the linked Doctype.
    • For Select fields, define the list of options separated by newline.
    • For Table fields, specify the Doctype of the child table.

5. default

  • Description: The default value of the field when a new document is created.
  • Use: Pre-fill commonly used values to reduce user input.

6. reqd (Required)

  • Description: Determines whether the field is mandatory.
  • Use: Ensure critical information is always provided when saving a document.

7. unique

  • Description: Ensures the value in this field is unique across all documents of the Doctype.
  • Use: Prevent duplicate entries for fields like serial numbers or unique identifiers.

8. read_only

  • Description: Makes the field non-editable.
  • Use: Protect fields that should not be modified after being set (e.g., system-generated fields).

9. hidden

  • Description: Hides the field from the form but stores its value in the database.
  • Use: Keep fields hidden but usable in backend logic or automation.

10. in_list_view

  • Description: Determines whether the field is displayed in the list view.
  • Use: Highlight important fields in the list view for quick reference.

11. in_standard_filter

  • Description: Makes the field available in standard filters for reports and list views.
  • Use: Allow users to filter documents based on the field.

12. bold

  • Description: Renders the field's value in bold.
  • Use: Use for emphasizing important fields visually in the form.

13. collapsible

  • Description: Allows the field to be part of a collapsible section.
  • Use: Group fields into collapsible sections to improve form readability.

14. translatable

  • Description: Indicates whether the field label and values are translatable.
  • Use: Enable this for fields that require multilingual support.

15. depends_on

  • Description: Defines a condition for displaying the field based on another field's value.
  • Use: Create dynamic forms where fields are shown or hidden based on user input.

16. mandatory_depends_on

  • Description: Specifies a condition for making the field mandatory based on another field's value.
  • Use: Conditionally enforce data entry based on related fields.

17. read_only_depends_on

  • Description: Specifies a condition for making the field read-only.
  • Use: Dynamically protect fields from editing based on other field values.

18. description

  • Description: Tooltip text displayed below the field.
  • Use: Provide additional context or instructions for users filling in the field.

19. width

  • Description: Defines the field’s width in the form layout.
  • Use: Adjust field width for better alignment in forms.

20. precision

  • Description: Specifies the number of decimal places for numeric fields.
  • Use: Ensure accuracy and consistency for fields like currency or percentages.

21. length

  • Description: Sets the maximum character length for the field value.
  • Use: Limit the length of text input for fields like phone numbers or codes.

22. fetch_from

  • Description: Specifies a field in a linked document from which the value is automatically fetched.
  • Use: Auto-populate values based on linked records (e.g., fetch a customer's address).

23. no_copy

  • Description: Prevents the field's value from being copied when duplicating a document.
  • Use: Useful for fields like status or timestamps that are unique to each document.

24. allow_on_submit

  • Description: Allows editing of the field even after the document is submitted.
  • Use: For fields that may require updates after submission, such as comments or remarks.

25. in_preview

  • Description: Determines if the field's value is displayed in the document preview.
  • Use: Highlight important fields in preview popups.

26. fetch_if_empty

  • Description: Fetches the field value only if it is empty.
  • Use: Avoid overwriting existing values while still providing default data when needed.

27. placeholder

  • Description: Placeholder text displayed inside the field when it's empty.
  • Use: Provide hints or examples for user input.

28. non_negative

  • Description: Ensures the field value is non-negative.
  • Use: For fields like quantity, price, or percentages, where negative values are invalid.

29. hide_border

  • Description: Removes the border for fields, typically used for aesthetic purposes.
  • Use: Create cleaner form designs by hiding borders for specific fields.

30. is_virtual

  • Description: Indicates that the field does not exist in the database and is calculated dynamically.
  • Use: Use for fields that derive their values through formulas or scripts.

31. remember_last_selected_value

  • Description: Retains the last selected value for the field.
  • Use: Speed up data entry by defaulting to the previously entered value.

  • Description: JSON object defining filters for linked fields.
  • Use: Restrict the available options in Link fields based on specific criteria.

By using these fields effectively, users can tailor the behavior and appearance of individual fields within a Doctype to meet their specific business needs.

Discard
Save
Was this article helpful?

On this page

Review Changes ← Back to Content
Message Status Space Raised By Last update on